if (!jsx3.lang.Class.forName("ux.cdb.admin.approvePkg.SelectLeaderDialog")) {
/**
 * Define the <code>tibco.spm.design.rule.builder.Builder</code> class.
 * This class inherit from <code>jsx3.gui.Dialog<code> GUI class.
 */
jsx3.Class.defineClass(
		"ux.cdb.admin.approvePkg.SelectLeaderDialog",
		jsx3.gui.Dialog,
		null,
		function (objRoot) {
			/**
			 * This method will be called after UI file has deserialized.
			 */
			objRoot.prototype.onAfterDeserialize = function() {
				var cdfDoc = ux.megatron.util.Dwr.toShallowCdf(this.leaderData,"jsxroot",{"sysUserId":"jsxid"});
				this.mtxLeader = this.get("mtxLeader");
				this.mtxLeader.setSourceXML(cdfDoc);
				this.mtxLeader.repaintData();
			}

			objRoot.prototype.onSubmit = function() {
				this.selectLeaderId = this.mtxLeader.getSelectedNodes().get(0).getAttribute("sysUserId");
				var me = this;
				ux.megatron.util.Dwr.callDwr("RetailStudentLoanBatchAuditingUCC",
						"assignApprovalOwner",
						[this.selectLeaderId,this.taskId],
						me,me.callBackassignApprovalOwner,
						"RetailStudentLoanBatchAuditingUCC");
			}

			objRoot.prototype.callBackassignApprovalOwner = function(dwrObjectList) {
				if(dwrObjectList.res.flag == 1){
					this.doClose();
					this.opener.closeDialog();
				}else{
					alert("Error,select leader failed");
				}
			}

			objRoot.prototype.onCancel = function() {
				this.doClose();
				this.opener.closeDialog();
			}
		});
}